package com.py.warehouse.service;

import com.py.warehouse.domain.BsWarehouse;
import com.py.warehouse.domain.BsWhLocation;
import com.ruoyi.system.api.domain.SysDept;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface IBsWhLocationService {

    List<BsWhLocation> selectBsWhLocation(BsWhLocation bsWhLocation);

    /**
     * 批量删除库位列表
     *
     * @param locationId 需要删除的库位列表主键集合
     * @return 结果
     */
    public int deleteBsWhLocationByLocationId(Long locationId);

    /**
     * 批量删除仓库列表
     *
     * @param locationId 需要删除的仓库列表主键集合
     * @return 结果
     */
    public int deleteBsWhLocationByLocationIds(Long[] locationId);

    /**
     * 修改库位列表
     *
     * @param bsWhLocation 库位列表
     * @return 结果
     */
    public int updateBsWhLocation(BsWhLocation bsWhLocation);

    /**
     * 新增仓库列表
     *
     * @param bsWhLocation 仓库列表
     * @return 结果
     */
    public int insertBsWhLocation(BsWhLocation bsWhLocation);

    /**
     * 查询库位列表
     *
     * @param locationId 库位列表主键
     * @return 库位列表
     */
    public BsWhLocation selectBsWhLocationByLocationId(Long locationId);

    /**
     * 查询库位列表最后一位
     *
     * @param
     * @return 库位列表
     */
    public BsWhLocation selectBsWhLocationByLocationEnd();

    /**
     * 给库位添加所属仓库
     *
     * @param
     * @return 库位列表
     */
    public int updateBsWhLocationByWarehouseCodes(Long[] warehouseIds,String warehouseCode);
    public int updateBsWhLocationDelWarehouseCodes(Long[] warehouseIds,String warehouseCode);

    Long[] selectWarehouseCode(String warehouseCode);

    /**
     * 查询库位数量
     *
     * @param warehouseCode 仓库编号
     * @return 库位列表
     */
    public Integer selectBsWhLocationByCount(String warehouseCode);

    /**
     * 停用
     */
    Integer updateDeactivate(String locationCode,String status);

    List<BsWhLocation> selectLocationByWarehouseCode(@Param("warehouseCode")String warehouseCode );

    int updateRemoveWarehouseCode(@Param("warehouseCode")String warehouseCode);

}
